package com.ruoyi.business.domain.dto.api.user;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel("app新增用户收货地址业务对象")
public class CreateOrderDTO implements Serializable {


    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID", required = false)
    private Long userId;

    /**
     * skuid
     */
    @ApiModelProperty(value = "skuid", required = true)
    @NotNull(message = "skuid不能为空")
    private Long skuId;

    /**
     * skuid
     */
    @ApiModelProperty(value = "sku数量", required = true)
    @NotNull(message = "购买数量不能为空")
    @Min(value = 1, message = "购买数量必须大于0")
    private Integer quantity;

    @ApiModelProperty(value = "是否使用koc产品卷兑换", required = true)
    private Boolean isUserCoupon;

    @ApiModelProperty(value = "koc产品兑换卷ids", required = false)
    private List<Long> couponIds;

    //地址id
    @ApiModelProperty(value = "地址id", required = true)
    private Long addressId;

}
